package com.sandu.product.fragment

import android.os.Bundle
import androidx.viewpager2.widget.ViewPager2
import com.sandu.lib_common.base.BaseDBFragment
import com.sandu.lib_common.utils.JumpUtils
import com.sandu.product.activity.ProductActivity
import com.sandu.product.databinding.ProductListFragmentBinding
import com.sandu.product.viewmodel.ProductListViewModel

class ProductListFragment(mainViewpager: ViewPager2) :
    BaseDBFragment<ProductListViewModel, ProductListFragmentBinding>() {
    override fun initView(savedInstanceState: Bundle?) {
        mDatabind.productListText.text = "this is product list"
        mDatabind.click = ProxyClick()
    }

    inner class ProxyClick {
        fun toProduct() {
            var params = Pair("test", "this is params value")
            activity?.let { it1 -> JumpUtils.jumpTo(it1, ProductActivity::class.java, params) }
        }

    }
}